package com.syni.mdd.yhd.common.all.entity;

import com.syni.mdd.yhd.common.all.entity.coupon.BmsFullCoupon;
import com.syni.mdd.yhd.common.all.entity.groupChat.BmsDxGroupChat;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Entity
@Table(name="bms_business_copy2")
@Data
public class BmsBusinessCopy implements Serializable {

    @Id                                                  //主键
    @GeneratedValue(strategy= GenerationType.IDENTITY)   //自增主键
    private Integer id;

    @Column(name = "vendor_name")
    private String vendorName;

    @Column(name = "addr_province")
    private String addrProvince;

    @Column(name = "addr_city")
    private String addrCity;

    @Column(name = "addr_district")
    private String addrDistrict;

    @Column(name = "addr_details")
    private String addrDetails;

    @Column(name = "tags")
    private String tags;

    @Transient
    private Integer tagsId;

    /*@JoinTable(name="bms_business_type_relation",
            joinColumns={@JoinColumn(name="bms_business_id")},
            inverseJoinColumns={@JoinColumn(name="bms_type_id")})
    @ManyToMany(cascade = CascadeType.REFRESH,fetch = FetchType.EAGER)
    private Set<BmsTag> bmsTagSet = new HashSet<>();*/

    @Column(name = "is_delete")
    private Integer isDelete;

    @Column(name = "new_time")
    private Date newTime;

    @Column(name = "dk_times")
    private Integer dkTimes;

    @Column(name = "latitude")
    private String latitude;

    @Column(name = "longitude")
    private String longitude;

    @Column(name = "logo_url")
    private String logoUrl;

    @Column(name = "front_img1")
    private String frontImg1;

    @Column(name = "front_img2")
    private String frontImg2;

    @Column(name = "is_auth")
    private Integer isAuth;

    @Column(name = "business_hours")
    private String businessHours;

    @Column(name = "label")
    private String label;

    @Column(name = "phone")
    private String phone;

    @Column(name = "is_unload")
    private Integer isUnload;

    @Column(name = "operating_state")
    private Integer operatingState;

    @Column(name = "vendor_name_update_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date vendorNameUpdateTime;

    @Column(name = "status")
    private Integer status;

    //@Column(name = "is_audit",insertable = false)
    //private Integer isAudit;

    @Transient
    private Integer labelId;

    @Transient
    List<BmsVideo> bmsVideos = new ArrayList<>();

    @Transient
    private Integer isUserFocus = 0;

    @Transient
    private Integer isOpenCoupon = 0;

    @Transient
    private Integer isOpenGroupBuy = 0;

    @Transient
    private Integer isOpenActivity = 0;

    @Transient
    private BmsFullCoupon bmsFullCoupon;

    @Transient
    BmsDxGroupChat bmsDxGroupChat;

    @Transient
    private double distance = 0d;



}

